package cn.tedu._05weibo.pojo.dto;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import javax.xml.bind.annotation.XmlElementWrapper;

@Data
public class UserRegDTO {
//    @NotNull(message = "用户名不能为null")
//    @NotEmpty(message = "用户名不能为null和空字符串")
//    @NotBlank(message = "用户名不能为null,不能为空字符串，空白串")
//    @Size(min = 6,max = 12,message = "用户名为6-12位")
    @Pattern(regexp = "^(?:(?:[a-zA-Z]{1,14})|(?:[\\u4e00-\\u9fa5]{1,7}))$",message = "用户名最长14个英文或者7汉字")
    @ApiModelProperty(value = "用户名",required = true,example = "周威")
    private String username;
    @ApiModelProperty(value = "密码",required = true)
    private String password;
    @ApiModelProperty(value = "昵称",required = true)
    private String nickname;
}
